<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        .box{width:100px;height:100px;background: pink;}
        .red{background: red;}
        .green{background: green;}
        .border{border:solid 10px black;}
        .color{color: yellow;}
        .fs{font-size: 30px;}
    </style>
</head>
<body>
    <div id="app">
        <div :class="'box'">hello</div>
        <div :class="msg">hello</div>
        <div :class="flag ? 'red' : 'green'">hello</div>
        <div :class="['red','border','color']">hello</div>
        <div :class="{border: flag, fs:!flag, box:!flag}">hello</div>
        <p :style="{width:'100px',background:'red'}">段落</p>
    </div>
</body>
<script src="./libs/vue.min.js"></script>
<script>
    new Vue({
        el: "#app",
        data(){
            return {
                flag:false,
                msg:"red"
            }
        }
    })
</script>
</html>